//package com.yundasys.lab02springbootstudy.aspect;
//
//import com.yundasys.lab02springbootstudy.annotation.Log;
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//import org.springframework.stereotype.Component;
//
//import java.util.HashMap;
//import java.util.Map;
//
///**
// * @PACKAGE_NAME: com.yundasys.lab02springbootstudy.aspect
// * @NAME: LogAspect
// * @USER: jiangta
// * @DATE: 2021/12/24
// * @TIME: 6:01 下午
// * @PROJECT_NAME: springboot-labs
// */
//@Aspect
//@Component
//public class LogAspect {
//
//    @Around(value = "@annotation(log)")
//    public Object log(ProceedingJoinPoint joinPoint, Log log) throws Throwable {
//        Object result = joinPoint.proceed();
//        //do something else
//        Map<String, Object> map = new HashMap<>();
//        map.put("userDo", result);
//        Object id = new SimpleTemplateEngine().createTemplate(log.id()).make(map);
//        Object content = new SimpleTemplateEngine().createTemplate(log.content()).make(map);
//        return result;
//    }
//
//}
